home *** CD-ROM | disk | FTP | other *** search
/ Chip 1996 November / Chip 11-96.iso / workshop / howto / serial < prev    next >
Text File  |  1996-05-25  |  42KB  |  1,342 lines

  1.   The Linux Serial HOWTO
  2.   by Greg Hankins, gregh@cc.gatech.edu
  3.   v1.6, 23 June 1994
  4.  
  5.   This document describes how to set up serial communications devices
  6.   on a Linux box.
  7.  
  8.   1.  Introduction
  9.  
  10.   This is the Linux Serial HOWTO.  All about how to set up modems and
  11.   terminals under Linux.
  12.  
  13.  
  14.   1.1.  Other sources of information
  15.  
  16.  
  17.  
  18.   o  man pages for: init(1), getty(1m), login(1), gettydefs(4),
  19.      setserial(8)
  20.  
  21.  
  22.   o  Your modem manual
  23.  
  24.  
  25.   o  ``Managing UUCP and Usenet'' by Tom O'Reilly and Grace Todino,
  26.      O'Reilly and Associates, Inc. ISBN: 0-937175-93-5
  27.  
  28.   o  UUCP HOWTO: for information on setting up UUCP
  29.  
  30.   o  Printing HOWTO: deals with setting up a serial printer
  31.  
  32.   o  NET-2 HOWTO: everything about SLIP, CSLIP, PPP, etc
  33.  
  34.   o  Term HOWTO: everything you wanted to know about term
  35.  
  36.  
  37.  
  38.   1.2.  New versions of this document
  39.  
  40.   New versions of the Linux Serial HOWTO will be periodically posted to
  41.   comp.os.linux.announce and news.answers.  They will also be uploaded
  42.   to various Linux FTP sites, including
  43.   sunsite.unc.edu:/pub/Linux/docs/HOWTO.  The Serial HOWTO is also
  44.   available at the following URL:
  45.   http://sunsite.unc.edu/mdw/HOWTO/Serial-HOWTO.html for WWW clients
  46.   such as mosaic.
  47.  
  48.  
  49.   1.3.  Feedback
  50.  
  51.   Please send me any comments, suggestions, or additional material.  I'm
  52.   always eager to hear about what you think about the HOWTO.  I'm also
  53.   always on the lookout for improvements!  Tell me exactly what you
  54.   don't understand, or what could be clearer.  You can reach me at
  55.   gregh@cc.gatech.edu.
  56.  
  57.  
  58.   If you find any wrong information, please contact me ASAP.
  59.  
  60.  
  61.   1.4.  Disclaimer
  62.  
  63.   Your milage may vary.  The answers given may not work for all systems
  64.   and all setup combinations.
  65.  
  66.  
  67.   2.  Supported serial hardware
  68.  
  69.   Linux supports, (ie is known to work with):
  70.  
  71.   o  standard PC serial boards
  72.  
  73.   o  standard PC internal modems
  74.  
  75.  
  76.  
  77.   Multiport serial boards:
  78.  
  79.   o  Usenet Serial Board II
  80.  
  81.   o  Boca 4-port (BB-1004)
  82.  
  83.   o  Boca 8-port (BB-1008)
  84.  
  85.   o  Boca 16-port (BB-2016)
  86.  
  87.   o  AST FourPort boards and clones
  88.  
  89.   o  Accent Async boards
  90.  
  91.   o  Bell Technologies HUB6
  92.  
  93.   o  STB-4COM
  94.  
  95.  
  96.   In general, Linux will support any serial board which uses a 8250,
  97.   16450, 16550, or 16550A (or compatible) UART, or an internal modem
  98.   which emulates one of the above UARTs.
  99.  
  100.  
  101.   Linux does not currently support any intelligent serial boards, but
  102.   will likely do so sometime in the future.
  103.  
  104.  
  105.   Special note on the BB-1004 and BB-1008, they do not support DCD and
  106.   RI lines, and thus are not usable for dialin modems.  They will work
  107.   fine for all other purposes.
  108.  
  109.  
  110.  
  111.   3.  What are the names of the serial ports?
  112.  
  113.   There are the 4 serial devices corresponding to COM1 - COM4:
  114.  
  115.  
  116.  
  117.        /dev/cua0, /dev/ttyS0 (COM1) address 0x3f8 IRQ 4
  118.        /dev/cua1, /dev/ttyS1 (COM2) address 0x2f8 IRQ 3
  119.        /dev/cua2, /dev/ttyS2 (COM3) address 0x3e8 IRQ 4
  120.        /dev/cua3, /dev/ttyS3 (COM4) address 0x2e8 IRQ 3
  121.  
  122.  
  123.  
  124.  
  125.   The /dev/ttySN devices are for incoming connections and /dev/cuaN
  126.   devices for outgoing connections.  N is the serial port number.  In
  127.   this document, I refer to COM1 as ttyS0, COM2 as ttyS1, COM3 as ttyS2,
  128.   and COM4 as ttyS3.  If I am refering to a specific device in /dev, I
  129.   will always prepend /dev to avoid confusing you.
  130.  
  131.  
  132.  
  133.   On some installations, two extra devices will be created, /dev/modem
  134.   for your modem and /dev/mouse for your mouse.  Both of these are
  135.   symbolic links to the appropriate /dev/cuaN device which you specified
  136.   during the installation (unless you have a bus mouse, then /dev/mouse
  137.   will point to the bus mouse device).
  138.  
  139.  
  140.   There has been some discussion on the merits of /dev/mouse and
  141.   /dev/modem.  I strongly discourage the use of these links.  In
  142.   particular, if you are planning on using your modem for dialin you
  143.   will run into problems because the lock files will not work correctly
  144.   if you use /dev/modem.  Also, Taylor UUCP does not support symlinks
  145.   either.
  146.  
  147.  
  148.  
  149.   3.1.  Major and minor device numbers of serial devices in /dev
  150.  
  151.  
  152.  
  153.        /dev/ttyS0 major 4, minor 64    /dev/cua0 major 5, minor 64
  154.        /dev/ttyS1 major 4, minor 65    /dev/cua1 major 5, minor 65
  155.        /dev/ttyS2 major 4, minor 66    /dev/cua2 major 5, minor 66
  156.        /dev/ttyS3 major 4, minor 67    /dev/cua3 major 5, minor 67
  157.  
  158.  
  159.  
  160.  
  161.  
  162.   Note that all distributions come with these devices already made
  163.   correctly.
  164.  
  165.  
  166.   3.1.1.  Creating devices in /dev
  167.  
  168.   If you don't have a device, you will have to create it with the mknod
  169.   command.
  170.  
  171.   Example, suppose you needed to create devices for ttyS0:
  172.  
  173.  
  174.  
  175.        linux# mknod -m 666 /dev/cua0 c 5 64
  176.        linux# mknod -m 666 /dev/ttyS0 c 4 64
  177.  
  178.  
  179.  
  180.  
  181.   You can also get the MAKEDEV script, available on the usual FTP sites.
  182.   This simplifies the making of devices.  For example, if you needed to
  183.   make the devices for ttyS0 you would type:
  184.  
  185.  
  186.  
  187.        linux# cd /dev
  188.        linux# MAKEDEV ttyS0
  189.  
  190.  
  191.  
  192.  
  193.   This handles the devices creation for the incoming and outgoing
  194.   devices.
  195.  
  196.  
  197.  
  198.  
  199.   3.1.2.  Notes for multiport boards
  200.  
  201.   The devices your multiport board uses depends on what kind of board
  202.   you have.  These are listed in detail in the rc.serial which comes
  203.   with the setserial program.  You will need to create these devices for
  204.   sure!  Either use the mknod command, or get the MAKEDEV script.
  205.   Devices for mulitport boards are made by adding 64 + the port number.
  206.   So, if you wanted to create devices for ttyS17, you would type:
  207.  
  208.  
  209.  
  210.        linux# mknod -m 666 /dev/cua17 c 5 81
  211.        linux# mknod -m 666 /dev/ttyS17 c 4 81
  212.  
  213.  
  214.  
  215.  
  216.  
  217.   Note that ``64 + 17 = 81''  Using the MAKEDEV script, you would type:
  218.  
  219.  
  220.  
  221.        linux# cd /dev
  222.        linux# /dev/MAKEDEV ttyS17
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.   4.  What is getty_ps?
  230.  
  231.   This is just another version of getty, which is a program that handles
  232.   some of the login process when you log in to a UNIX box.  It was
  233.   written by Paul Sutcliffe, Jr. <paul@devon.lns.pa.us>.  Kris Gleason
  234.   <gleasokr@boulder.colorado.edu> currently maintains it.  2.0.7e is the
  235.   latest version, and supercedes any older versions.  Most Linux
  236.   distributions come with getty_ps installed as the default getty.
  237.   Thus, I will mainly focus on using the getty_ps package in this
  238.   document, but you are free to use any getty you like.  You should
  239.   check to make sure you do indeed have getty_ps as the default getty.
  240.   At your Linux prompt, type:
  241.  
  242.  
  243.  
  244.        linux# strings /etc/getty | grep RINGBACK
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.   If grep returns ``RINGBACK'' then you have the right getty.  If you do
  252.   not have this version of getty, I highly recommend that you get it.
  253.   It can be found on the standard Linux FTP sites.  (Kris has promised
  254.   me to implement a version feature in the next release, to avoid doing
  255.   this grep sillyness.)
  256.  
  257.  
  258.   4.1.  Installing getty_ps
  259.  
  260.   Get the package from a Linux FTP site, and install according to the
  261.   instructions.
  262.  
  263.  
  264.  
  265.   Be sure that the new getty_ps works correctly before you remove all
  266.   the other versions!  I recommend changing one of your virtual console
  267.   lines from:
  268.  
  269.  
  270.  
  271.        c2:23456:respawn:/etc/getty tty2
  272.  
  273.  
  274.  
  275.  
  276.  
  277.   to:
  278.  
  279.  
  280.  
  281.        c2:23456:respawn:/etc/getty_ps tty2 VC console
  282.  
  283.  
  284.  
  285.  
  286.  
  287.   Put this line in your /etc/gettydefs:
  288.  
  289.  
  290.        VC# B9600 SANE CLOCAL # B9600 SANE -ISTRIP CLOCAL #@S @L login: #VC
  291.  
  292.  
  293.  
  294.  
  295.  
  296.   and restart init:
  297.  
  298.  
  299.  
  300.        linux# kill -HUP 1
  301.  
  302.  
  303.  
  304.  
  305.  
  306.   If you can log in on a console with getty_ps, it's working.  Move
  307.   getty_ps to getty or link it.  Be sure to update your /etc/inittab to
  308.   correctly invoke the new getty.  The entries need to be in the form
  309.   of:
  310.  
  311.  
  312.  
  313.        id:runlevel:action:/etc/{uu}getty [options] line [speed [term [lined]]]
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.   getty_ps also uses syslogd to log messages.  See the man pages for
  321.   syslogd(1) and syslog.conf(5) for setting up syslogd, if you don't
  322.   have it running already.  Messages are logged with priority LOG_AUTH,
  323.   errors use LOG_ERR, and debugging uses LOG_DEBUG.  If you don't want
  324.   to use syslogd you can edit tune.h in the getty_ps source files to use
  325.   a log file for messages and debugging instead, but you'll have to
  326.   recompile the whole thing.
  327.  
  328.  
  329.   Once you have installed getty_ps, and are certain it is working, you
  330.   can remove any other versions of getty you have.  Be sure to check in
  331.   /bin, /etc, /usr/bin, /usr/etc, /usr/man/man1, and /usr/man/cat1 for
  332.   any thing called getty - there are old versions lurking everywhere.
  333.   Also, you can safely remove the old config file /etc/gettytab - you
  334.   only need /etc/gettydefs.  From this point on, all references to getty
  335.   will refer to getty_ps.  References to uugetty will refer to the
  336.   uugetty that comes with the getty_ps package.
  337.  
  338.  
  339.  
  340.  
  341.   5.  What is setserial?
  342.  
  343.   setserial is a program which allows you to look at and change various
  344.   attributes of a serial device, including its port, its IRQ, and other
  345.   serial port options.  It was initially written Rick Sladkey, and was
  346.   heavily modified by Ted T'so <tytso@athena,mit.edu>, who also
  347.   maintains it.  The newest version is 2.10, and can be found on the
  348.   Linux FTP sites.  You can find out what version you have by running
  349.   setserial with no arguments.
  350.  
  351.  
  352.   On boot, only the ttyS{0-3} ports are configured, using the default
  353.   IRQ of 4 and 3.  So, if you have any other serial ports provided by
  354.   other boards (such as an AST Fourport), or if ttyS{0-3} have a non-
  355.   standard IRQ, you must use this program in order to configure those
  356.   serial ports.  For the full listing of options, consult the man page.
  357.  
  358.  
  359.  
  360.   6.  How do I dial out with my modem?
  361.  
  362.   6.1.  Hardware requirements
  363.  
  364.   First, make sure you have the right cable.  Your modem requires a
  365.   straight through cable, with no pins crossed.  Any computer store
  366.   should have these.  Make sure you get the correct gender.  Your DB25
  367.   serial port on your PC is always male.  Do not confuse it with the
  368.   parallel port, which is the female DB25.  Hook up your modem to one of
  369.   your serial ports.  Consult your modem manual on how to do this.
  370.  
  371.  
  372.   6.1.1.  Notes on internal modems
  373.  
  374.   For an internal modem, you will not need a cable.  An internal modem
  375.   does not need a serial port, it has one built in.  All you need to do
  376.   is configure it to use an interrupt that is not being used, and
  377.   configure the I/O address.  Consult your modem manual if you get
  378.   stuck.  Also, see section ``Can I use more than   2 serial devices?''
  379.   if you need help on choosing interrupts or addresses.
  380.  
  381.   Due to a bit of stupidity on IBM's part, you may encounter problems if
  382.   you want your internal modem to be on ttyS3.  If Linux does not detect
  383.   your internal modem on ttyS3, you can use setserial and the modem will
  384.   work fine.  Internal modems on ttyS{0-2} should not have any problems
  385.   being detected.
  386.  
  387.  
  388.   6.2.  Talking to your modem
  389.  
  390.   Make sure that nothing is using the serial port you hooked your modem
  391.   to.  Check to see if there is a getty watching it.  If there is a
  392.   getty process running on that port, check your /etc/inittab file for
  393.   entries using that serial port.  Comment the line out (with a ``#'')
  394.   and restart init.  Do not comment any lines that contain a ttyN
  395.   device, only ones containing ttySN devices. ttyN devices are your
  396.   virtual consoles.
  397.   Use kermit to test the setup.  For example, say your modem was on
  398.   ttyS3, and it could handle 2400 bps.  You would do the following:
  399.  
  400.  
  401.        linux# kermit
  402.        C-Kermit 5A(188), 23 Nov 92, POSIX
  403.        Type ? or HELP for help
  404.        C-Kermit>set line /dev/cua3
  405.        C-Kermit>set speed 2400
  406.        /dev/cua3, 2400 bps
  407.        C-Kermit>c
  408.        Connecting to /dev/cua3, speed 2400.
  409.        The escape character is Ctrl-\ (ASCII 28, FS)
  410.        Type the escape character followed by C to get back,
  411.        or followed by ? to see other options.
  412.        AT
  413.        OK
  414.        <ctrl>-\-C
  415.        (Back at linux)
  416.        C-Kermit>quit
  417.        linux#
  418.  
  419.  
  420.  
  421.  
  422.  
  423.   If your modem responds to AT commands, you can assume your modem is
  424.   working correctly on the Linux side.  Try dialing another modem.  If
  425.   you don't like kermit, try one of the more advanced comm programs.
  426.   Check out section ``Noteworthy communications programs'' about comm
  427.   programs if you need some pointers.
  428.  
  429.  
  430.   6.3.  Dial out modem configuration
  431.  
  432.   For dial out use only, you can configure your modem however you want.
  433.  
  434.  
  435.   I like to see result codes, so I set Q0 - result codes are reported.
  436.   To set this on my modem, I would have to preceed the register name
  437.   with an AT command.  Using kermit or some comm program, connect to
  438.   your modem and do the following:
  439.  
  440.  
  441.        ATQ0
  442.  
  443.  
  444.  
  445.  
  446.  
  447.   If your modem says OK back to you, then the register is set.  Do this
  448.   for each register you want to set.
  449.  
  450.  
  451.   I also like to see what I'm typing, so I set E1 - command echo on.  If
  452.   your modem has data compression capabilities, you probably want to
  453.   enable them.  You may want to enable RTS/CTS handshaking.  Note that
  454.   you will also have to enable the hardware handshaking on the serial
  455.   port itself, too.  This is best done on startup (say in rc.local or
  456.   rc.serial) by saying:
  457.  
  458.  
  459.  
  460.        stty crtscts < /dev/cua3
  461.  
  462.  
  463.   Make sure you put in the correct serial port for your setup.  Consult
  464.   your modem manual for more help, and a full listing of options.  If
  465.   your modem supports a stored profile, be sure to write the
  466.   configuration to the modem.
  467.  
  468.  
  469.  
  470.   7.  How do I dial in and out with my modem?
  471.  
  472.   Get your modem to dial out correctly.
  473.  
  474.   7.1.  Dial in and out modem configuration
  475.  
  476.   For dialin and dialout use, you have to set up your modem a certain
  477.   way (again, using the AT command on your modem):
  478.  
  479.  
  480.        E1       command echo ON
  481.        Q0       result codes are reported
  482.        V1       verbose ON
  483.        S0=0     never answer (uugetty handles this with the WAITFOR option)
  484.  
  485.  
  486.  
  487.  
  488.   If you don't set these correctly, your INIT string in your config file
  489.   may fail, hosing the whole process.  But, more on config files
  490.   below...
  491.  
  492.  
  493.  
  494.        &C1     DCD is on after connect only
  495.  
  496.  
  497.  
  498.  
  499.   If DCD is always on, getty will always think there is a connection,
  500.   and may try to log people in.
  501.  
  502.   Other things you should set:
  503.  
  504.  
  505.  
  506.        &S0     DSR is always on
  507.        &D3     DTR on/off resets modem
  508.        enable your data compression (setting depend on modem manufacturer,
  509.                                      consult your modem manual)
  510.        autobaud                     (same applies here)
  511.        enabling RTS/CTS             (here too)
  512.  
  513.  
  514.  
  515.  
  516.  
  517.   If your modem does not support a stored profile, you can set these
  518.   through the INIT string in your config file.  See below.
  519.  
  520.  
  521.   7.2.  Example modem setup
  522.  
  523.   Here is my modem setup, for a Telebit T1600.  Most things should work
  524.   for any Hayes compatible modem though.  Don't worry if there are some
  525.   things in my setup that aren't on yours.
  526.  
  527.  
  528.  
  529.   T1600 - Version LA1.00  - Active Configuration
  530.    B1  E1  L2  M0  P   Q0  V1  X12  Y0
  531.   &C1 &D3 &G0 &J0 &L0 &Q0 &R3 &S1 &T4 &X0
  532.   S000=0   S001=0   S002=43  S003=13  S004=10  S005=8   S006=2   S007=40
  533.   S008=2   S009=6   S010=14  S011=70  S012=50  S018=0   S025=5   S026=1
  534.   S038=0   S041=0   S045=0   S046=0   S047=4   S048=0   S050=0   S051:254
  535.   S056=17  S057=19  S058:2   S059=0   S060=0   S061:0   S062=15  S063=0
  536.   S064:1   S068:3   S069=0   S090=0   S093=8   S094=1   S100=0   S102=0
  537.   S104=0   S105=1   S111:30  S112=1   S180:3   S181=1   S183=25  S190=1
  538.   S253=10  S254=255 S255=255
  539.  
  540.  
  541.  
  542.  
  543.  
  544.   7.3.  Setting up uugetty
  545.  
  546.   Replace the stock getty with getty_ps as described in section ``What
  547.   is <tt>getty_ps</tt>''.  Update /etc/gettydefs to include entries for
  548.   modems (note that the entries point to each other, these are not for
  549.   fixed speed):
  550.  
  551.  
  552.        # Modem entries
  553.        38400# B38400 CS8 # B38400 SANE -ISTRIP HUPCL #@S @L @B login: #19200
  554.  
  555.        19200# B19200 CS8 # B19200 SANE -ISTRIP HUPCL #@S @L @B login: #9600
  556.  
  557.        9600# B9600 CS8 # B9600 SANE -ISTRIP HUPCL #@S @L @B login: #2400
  558.  
  559.        2400# B2400 CS8 # B2400 SANE -ISTRIP HUPCL #@S @L @B login: #1200
  560.  
  561.        1200# B1200 CS8 # B1200 SANE -ISTRIP HUPCL #@S @L @B login: #300
  562.  
  563.        300# B300 CS8 # B300 SANE -ISTRIP HUPCL #@S @L @B login: #38400
  564.  
  565.  
  566.  
  567.  
  568.  
  569.   If you have a 9600 bps or faster modem with flow control, you can lock
  570.   your serial port speed and let the modem handle the translation to
  571.   other bps rates. Then, instead of the step down series of lines listed
  572.   below, /etc/gettydefs only needs to contain one line for the modem:
  573.  
  574.  
  575.  
  576.        # 38400 fixed speed
  577.        38400# B38400 CS8 # B38400 SANE -ISTRIP HUPCL #@S login: #38400
  578.        # 19200 fixed speed
  579.        19200# B19200 CS8 # B19200 SANE -ISTRIP HUPCL #@S login: #19200
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.   If you have your modem set up to do RTS/CTS hardware flow control, you
  587.   can add CRTSCTS to the entries.  (Be sure you enable RTS/CTS on the
  588.   serial port!).
  589.  
  590.  
  591.   Next, make sure that you have an outgoing and incoming device for the
  592.   serial port your modem is on.  If you have your modem on ttyS3 you
  593.   will need the /dev/cua3, and /dev/ttyS3 devices.  If you don't have
  594.   the correct devices, see section ``Creating devices in <tt>/dev</tt>''
  595.   on how to create devices, and create the devices.
  596.  
  597.  
  598.   7.4.  Customizing uugetty
  599.  
  600.   There are lots of parameters you can tweak for each port you have.
  601.   These are implemented in seperate config files for each port.  The
  602.   file /etc/conf.uugetty will be used by all instances of uugetty, and
  603.   /etc/conf.uugetty.ttySN will only be used by that one port.  Sample
  604.   default config files can be found with the getty_ps source files,
  605.   which come with most Linux distributions.  Due to space concerns, they
  606.   are not listed here.  Note that if you are using older versions of
  607.   getty (older than 2.0.7e) then the default files will be in
  608.   /etc/default/uugetty.ttySN.  My /etc/conf.uugetty.ttyS3 looks like
  609.   this:
  610.  
  611.  
  612.        # sample uugetty configuration file for a Hayes compatible modem to allow
  613.        # incoming modem connections
  614.        #
  615.  
  616.        # alternate lockfile to check... if this lockfile exists, then uugetty is
  617.        # restarted so that the modem is re-initialized
  618.        ALTLOCK=cua3
  619.        ALTLINE=cua3
  620.  
  621.        # line to initialize
  622.        INITLINE=cua3
  623.  
  624.        # timeout to disconnect if idle...
  625.        TIMEOUT=60
  626.  
  627.        # modem initialization string...
  628.        #
  629.        # format: <expect> <send> ... (chat sequence)
  630.        INIT="" \d+++\dAT\r OK\r\n ATH0\r OK\r\n AT\sE1\sQ0\sATS0=0\r OK\r\n
  631.  
  632.        WAITFOR=RING
  633.        CONNECT="" ATA\r CONNECT\s\A
  634.  
  635.        # this line sets the time to delay before sending the login banner
  636.        DELAY=1
  637.  
  638.        #DEBUG=010
  639.  
  640.  
  641.  
  642.  
  643.  
  644.   Add the following line to your /etc/inittab, so that uugetty is run on
  645.   your serial port:
  646.  
  647.  
  648.        S3:456:respawn:/etc/uugetty ttyS3 38400
  649.        (^port without ``tty''      ^port ^-- put your highest modem speed here)
  650.  
  651.  
  652.  
  653.  
  654.  
  655.   Restart init:
  656.  
  657.  
  658.        linux# kill -HUP 1
  659.  
  660.  
  661.   Now Linux will be watching your serial port for connections.  Notice
  662.   that we use uugetty for modems.  This is because it does things like
  663.   checking lock files.
  664.  
  665.   Dial in from another site and log in to you Linux system.  Rejoice.
  666.  
  667.  
  668.   getty and uugetty have a lot more options, see the man page for
  669.   getty(1m) for a full description.  Among other things there is a
  670.   scheduling feature, and a ringback feature.  RTFM :-).
  671.  
  672.  
  673.  
  674.   8.  How do I set up a terminal connected to my PC?
  675.  
  676.   8.1.  Hardware requirements
  677.  
  678.   Make sure you have the right kind of cable.  A null modem cable bought
  679.   at a computer store will do it.  But it must be a null modem cable!
  680.   Make sure you are using your serial port, and not your parallel port.
  681.  
  682.  
  683.  
  684.   At a minimum, you should have (for a DB25 connector):
  685.  
  686.           RxD   Receive Data          2 - 3       TxD   Transmit Data
  687.           TxD   Transmit Data         3 - 2       RxD   Receive Data
  688.           GND   Signal Ground         7 - 7       GND   Signal Ground
  689.  
  690.  
  691.  
  692.   If you want to have flow control and hardware handshaking, you must
  693.   have a full null modem cable:
  694.  
  695.                 Frame Ground          1 - 1             Frame Ground
  696.           RxD   Receive Data          2 - 3       TxD   Transmit Data
  697.           TxD   Transmit Data         3 - 2       RxD   Receive Data
  698.           RTS   Request To Send       4 - 5       CTS   Clear To Send
  699.           CTS   Clear To Send         5 - 4       RTS   Request To Send
  700.           DSR   Data Set Ready        6 - 20      DTR   Data Terminal Ready
  701.           GND   Signal Ground         7 - 7       GND   Signal Ground
  702.           DCD   Carrier Detect        8 - 20      DTR   Data Terminal Ready
  703.           DTR   Data Terminal Ready  20 - 6       DSR   Data Set Ready
  704.           DTR   Data Terminal Ready  20 - 8       DCD   Carrier Detect
  705.  
  706.  
  707.  
  708.   If you have a DB9 connector on your port, try the following:
  709.  
  710.                                     DB9   DB25
  711.           RxD   Receive Data          2 - 3       TxD   Transmit Data
  712.           TxD   Transmit Data         3 - 2       RxD   Receive Data
  713.           GND   Signal Ground         5 - 7       GND   Signal Ground
  714.  
  715.  
  716.  
  717.   Alternatively, a DB9-DB25 null modem cable:
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.                                     DB9   DB25
  728.           DCD   Carrier Detect        1 - 20      DTR   Data Terminal Ready
  729.           RxD   Receive Data          2 - 2       TxD   Transmit Data
  730.           TxD   Transmit Data         3 - 3       RxD   Receive Data
  731.           DTR   Data Terminal Ready   4 - 6       DSR   Data Set Ready
  732.           DTR   Data Terminal Ready   4 - 8       DCD   Carrier Detect
  733.           GND   Signal Ground         5 - 7       GND   Signal Ground
  734.           DSR   Data Set Ready        6 - 20      DTR   Data Terminal Ready
  735.           RTS   Request To Send       7 - 5       CTS   Clear To Send
  736.           CTS   Clear To Send         8 - 4       RTS   Request To Send
  737.           (RI Ring Indicator          9 not needed)
  738.  
  739.  
  740.  
  741.   If you are not using a full null modem cable, you might have to do the
  742.   following trick: on your computer side of the connector, connect RTS
  743.   and CTS together, and also connect DSR, DCD and DTR together.  This
  744.   way, when the computer wants a certain handshaking signal, it will get
  745.   it (from itself).
  746.  
  747.   Now that you have the right kind of cable, connect your terminal to
  748.   your computer.  If you can, tell you terminal to ignore modem control
  749.   signals.  Try using 9600 bps, 8 data bits, 1 stop bit, no parity bits
  750.   for the terminal's setup.
  751.  
  752.  
  753.   8.2.  Setting up getty
  754.  
  755.   Replace the stock getty with getty_ps as described in section ``What
  756.   is <tt>getty_ps</tt>?''.  Add an entry for getty to use for your
  757.   terminal in /etc/gettydefs:
  758.  
  759.  
  760.  
  761.        #9600 bps Dumb Terminal entry
  762.        DT9600# B9600 CS8 CLOCAL # B9600 SANE -ISTRIP CLOCAL #S @L login: #DT9600
  763.  
  764.  
  765.  
  766.  
  767.  
  768.   You can add HUPCL so the login is killed whenever you switch of the
  769.   terminal (provided you use a proper null modem cable).
  770.  
  771.  
  772.   Edit your /etc/inittab file to run getty on the serial port
  773.   (substituting in the correct information for your environment):
  774.  
  775.  
  776.        S1:456:respawn:/etc/getty ttyS1 DT9600 vt100
  777.  
  778.  
  779.  
  780.  
  781.  
  782.   Restart init:
  783.  
  784.  
  785.        linux# kill -HUP 1
  786.  
  787.  
  788.  
  789.  
  790.  
  791.   At this point, you should see a login prompt on your terminal.  You
  792.   may have to hit return a couple of times to get the terminal's
  793.   attention.  Rejoice.  Party.  Log in on your terminal and PC.  talk to
  794.   yourself from accross the room.
  795.  
  796.  
  797.   9.  Can I use more than 2 serial devices?
  798.  
  799.   You don't need to read this section, unless you want to use 3 or more
  800.   serial devices... (assuming you don't have a multiport board).
  801.  
  802.  
  803.   Providing you have another spare serial port, yes, you can.
  804.  
  805.  
  806.   The number of serial ports you can use is limited by the number of
  807.   interrupts (IRQ) and port I/O addresses we have to use.  Each serial
  808.   devices must be assigned it's own interrupt and address.  A serial
  809.   device can be a serial port, an internal modem, or a multiport serial
  810.   board.
  811.  
  812.  
  813.   Multiport serial boards are specially designed to have multiple serial
  814.   ports that share the same IRQ for all serial ports on the board.
  815.   Linux gets data from them by using a different I/O address for each
  816.   port on the card.
  817.  
  818.  
  819.   9.1.  Choosing serial device interrupts
  820.  
  821.   Your PC will normally come with ttyS0 and ttyS2 at IRQ 4, and ttyS1
  822.   and ttyS3 at IRQ 3.  To use more than 2 serial devices, you will have
  823.   to give up an interrupt to use.  A good choice is to reassign an
  824.   interrupt from your parallel port.  Your PC normally comes with IRQ 5
  825.   and IRQ 7 set up as interrupts for your parallel ports, but few people
  826.   use 2 parallel ports.  You can reassign one of the interrupts to a
  827.   serial device, and still happily use a parallel port.  You will need
  828.   the setserial program to do this.  In addition, you have to play with
  829.   the jumpers on your boards, check the docs for your board.  Set the
  830.   jumpers to the IRQ you want for each port.
  831.  
  832.  
  833.   You will need to set things up so that there is one, and only one
  834.   interrupt for each serial device.  Here is how I set mine up in
  835.   /etc/rc.local - you should do it upon startup somewhere:
  836.  
  837.  
  838.  
  839.                /etc/setserial /dev/cua0 irq 3          # my mouse
  840.                /etc/setserial /dev/cua1 irq 4          # my dumb terminal
  841.                /etc/setserial /dev/cua2 irq 5          # my 2400 bps modem
  842.                /etc/setserial /dev/cua3 irq 9          # my telebit modem
  843.  
  844.  
  845.  
  846.  
  847.  
  848.   Standard IRQ assignments:
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.                 IRQ  0    Timer channel 0
  860.                 IRQ  1    Keyboard
  861.                 IRQ  2    Cascade for controller 2
  862.                 IRQ  3    Serial port 2
  863.                 IRQ  4    Serial port 1
  864.                 IRQ  5    Parallel port 2
  865.                 IRQ  6    Floppy diskette
  866.                 IRQ  7    Parallel port 1
  867.                 IRQ  8    Real-time clock
  868.                 IRQ  9    Redirected to IRQ2
  869.                 IRQ 10    not assigned
  870.                 IRQ 11    not assigned
  871.                 IRQ 12    not assigned
  872.                 IRQ 13    Math coprocessor
  873.                 IRQ 14    Hard disk controller
  874.                 IRQ 15    not assigned
  875.  
  876.  
  877.  
  878.  
  879.  
  880.   There is really no Right Thing to do when choosing interrupts.  Just
  881.   make sure it isn't being used.  2, 3, 4, 5, or 7  is a good choice.
  882.   ``not assigned'' means that currently nothing standard uses these
  883.   IRQs.  Also note that IRQ 2 is the same as IRQ 9.  You can call it
  884.   either 2 or 9, the serial driver is very understanding.
  885.  
  886.  
  887.   If you have a serial card with a 16-bit bus connector, you can also
  888.   use IRQ 10, 11, 12 or 15.
  889.  
  890.  
  891.   Just make sure you don't use IRQ 0, 1, 6, 8, 13 or 14!  These are used
  892.   by your mother board.  You will make her very unhappy by taking her
  893.   IRQs.
  894.  
  895.  
  896.   9.2.  Setting serial device addresses
  897.  
  898.   Next, you must set the port address.  Check the manual on your board
  899.   for the jumper settings.  Like interrupts, there can only be one
  900.   serial device at each address.  Yours port will usually come
  901.   configured as follows:
  902.  
  903.  
  904.                /dev/cua0, /dev/ttyS0 address 0x3f8 ttyS0
  905.                /dev/cua1, /dev/ttyS1 address 0x2f8 ttyS1
  906.                /dev/cua2, /dev/ttyS2 address 0x3e8 ttyS2
  907.                /dev/cua3, /dev/ttyS3 address 0x3e8 ttyS3
  908.  
  909.  
  910.  
  911.  
  912.   Choose which address you want each serial device to have and set the
  913.   jumpers accordingly.  I have my modem on ttyS3, and my mouse on ttyS0.
  914.  
  915.   When you reboot, Linux should see your serial ports at the address you
  916.   set them.  The IRQ Linux sees may not correspond to the IRQ you set
  917.   with the jumpers.  Don't worry about this.  Linux does not do any IRQ
  918.   detection when it boots, because IRQ detection is dicy and can be
  919.   fooled.  Use setserial to tell Linux what IRQ the port is using.
  920.  
  921.  
  922.  
  923.  
  924.  
  925.   10.  Can Linux configure the serial devices automagically?
  926.  
  927.   Yes.  To get Linux to detect and set up the serial devices
  928.   automatically on startup, add the line:
  929.  
  930.  
  931.        /etc/setserial /dev/cua0 auto_irq skip_test autoconfig
  932.  
  933.  
  934.  
  935.  
  936.   to your /etc/rc.local or /etc/rc.serial file.  Do this for every
  937.   serial port you want to auto configure.  Be sure to give the correct
  938.   location of where your setserial program lives, and give a device name
  939.   that really does exist on your machine.
  940.  
  941.  
  942.   10.1.  Notes for multiport boards
  943.  
  944.   For board addresses, and IRQs, look at the rc.serial that comes with
  945.   the setserial program.  It has a lot of detail on multiport boards,
  946.   including I/O addresses and device names.
  947.  
  948.  
  949.   11.  How do I set up my serial ports for higher speeds?
  950.  
  951.   Use setserial, with the spd_hi flag to configure your serial port to
  952.   use 57600 bps.  Use spd_vhi to use 115200 bps.  Then, set your speed
  953.   to 38400 bps.  This is now the new speed you have set.  There is no
  954.   speed named 57600 or 115200.
  955.  
  956.  
  957.   Make sure you have 16550A UARTs :-).
  958.  
  959.  
  960.   12.  Noteworthy communications programs        and utilities
  961.  
  962.   Once you get everything working, you may want to check out these more
  963.   advanced programs, all are available on the usual FTP sites.
  964.  
  965.  
  966.   o  Seyon - X based comm program
  967.  
  968.   o  xconn - X based comm program
  969.  
  970.   o  Minicom - friendly serial communication program
  971.  
  972.   o  Procomm - procommish comm program with zmodem
  973.  
  974.  
  975.   These programs offer more features that just kermit alone, including
  976.   telephone directories, auto-dialing and so on.
  977.  
  978.  
  979.   o  Another useful program is term.  term multiplexes many connections
  980.      over one serial line.  It is somewhat similar to SLIP, and offers
  981.      some SLIP functionality.  These include rlogin, telnet, ftp, ncftp,
  982.      finger, rdate, xmosaic and tredir.  tredir is a special program
  983.      which lets you redirect remote TCP/IP ports to your local machine.
  984.      This allows for remote NNTP, and SMTP access.  The good thing about
  985.      term is that is runs entirely in user space, meaning it requires no
  986.      kernel support, or sysadmin support (like SLIP does).
  987.  
  988.   o  screen is another multi-session program.  This one behaves like the
  989.      virtual consoles.
  990.  
  991.   o  callback is a program that will have your modem call you back
  992.      immediately from where you just called.
  993.  
  994.   o  mgetty+fax handles FAX stuff, and provides an alternate getty
  995.  
  996.  
  997.   o  Other things can be found on
  998.      sunsite.unc.edu:/pub/Linux/system/Serial and
  999.      sunsite.unc.edu:/pub/Linux/apps/comm.  These are the directories
  1000.      where all the serial type things are kept.
  1001.  
  1002.  
  1003.  
  1004.   13.  More serial tips
  1005.  
  1006.  
  1007.   Here are some serial tips you might find helpful...
  1008.  
  1009.  
  1010.   13.1.  kermit and zmodem
  1011.  
  1012.   To use zmodem with kermit, add the following to your .kermrc:
  1013.  
  1014.  
  1015.        define rz !rz < /dev/cua3 > /dev/cua3
  1016.        define sz !sz \%0 > /dev/cua3 < /dev/cua3
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.   Be sure to put in the device your modem is on.  Then, to use it, just
  1023.   type rz or sz <filename> at the kermit prompt.
  1024.  
  1025.  
  1026.   13.2.  Setting terminal types automagically
  1027.  
  1028.   To set your terminal type automagically when you log in, look at
  1029.   /etc/ttytype.  Put in the device, and corresponding terminal type, and
  1030.   your TERM variable will be set when you log in.
  1031.  
  1032.   Say I have a vt100 terminal on ttyS1, I would put:
  1033.  
  1034.  
  1035.        vt100 ttyS1
  1036.  
  1037.  
  1038.  
  1039.  
  1040.   in /etc/ttytype.
  1041.  
  1042.  
  1043.   You can also get tset from sunsite.unc.edu:/pub/Linux/system/Terminal-
  1044.   management/.  See the docs that come with tset to learn how to use it.
  1045.   tset can establish terminal characteristics when you log in, and
  1046.   doesn't depend on any defaults.
  1047.  
  1048.  
  1049.   13.3.  Color ls on serial connections
  1050.  
  1051.   If ls is screwing up your terminal emulation with the color feature,
  1052.   turn it off.  ls -o, ls --color, and ls --colour all use the color
  1053.   feature.  Some installations have ls set to use color by default.
  1054.  
  1055.  
  1056.  
  1057.   13.4.  Printing to a printer connected to a terminal
  1058.  
  1059.   There is a program called vtprint that will do this.  It is available
  1060.   from ftp.sdsu.edu:/pub/vtprint.  The following is from the README file
  1061.   that comes with the program:
  1062.  
  1063.  
  1064.        vtprint is a program that allows users to print from a
  1065.        remote UNIX host to a printer attached to their local termi-
  1066.        nal or emulator, which makes it great for printing files at
  1067.        home, etc. (It only does text files, though.)
  1068.  
  1069.  
  1070.  
  1071.   14.  Linux FTP sites
  1072.  
  1073.  
  1074.  
  1075.        sunsite.unc.edu(152.2.22.81):/pub/Linux         (NC, USA)
  1076.        tsx-11.mit.edu(18.172.1.2):/pub/linux           (MA, USA)
  1077.        nic.funet.fi(128.214.6.100):/pub/OS/Linux       (Finland, Europe)
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.   These FTP sites support annonymous FTP, which means login as ftp, and
  1084.   password as your email address, ie logname@yourhost.yourdomain.
  1085.  
  1086.  
  1087.   15.  What are locks?
  1088.  
  1089.   Locks are simply a file saying that a particular device is in use.
  1090.   They are kept in /usr/spool/uucp.  Locks are named LCK..<name>, where
  1091.   <name> is either a device name, or a UUCP site name.  Certain
  1092.   processes create these locks so that they can have exclusive access to
  1093.   devices, for instance if you dial out on your modem, a lock will
  1094.   appear telling other processes that someone is using the modem
  1095.   already.  Locks mainly contain the PID of the process that has locked
  1096.   the device.  Most programs look at the lock, and try to determine if
  1097.   that lock is still valid by checking the process table for the process
  1098.   that has locked the device.  If the lock is found to be valid, the
  1099.   program should exit.  If not, some programs remove the stale lock, and
  1100.   use the device, creating their own lock in the process.
  1101.  
  1102.  
  1103.   16.  What are UARTs?  How do they affect performance?
  1104.  
  1105.   UARTs (Universal Asyncronous Receiver Transmitter) are chips inside
  1106.   your communication devices (terminal, serial card).  There is one on
  1107.   each end of a connection.  Their purpose is to convert data (bytes) to
  1108.   bits, send each bit down the serial line, and then rebuild the data
  1109.   again on the other end.  The UARTs are asyncronous devices, because
  1110.   the time interval between transmission of data is not fixed.  UARTs
  1111.   deal with data in byte size pieces.
  1112.  
  1113.  
  1114.   Say you have a terminal hooked up to your PC.  When you type a
  1115.   character, the terminal presents it to it's UART.  The UART shifts
  1116.   that character (a byte) out onto the serial line one bit at at time,
  1117.   at a specific rate.  Hence, we have the rates 110, 300, 1200, 2400,
  1118.   ... bits/sec (bps).  This is simply a measure of how fast bits are
  1119.   being sent.  On the other end, the receiving UART takes all the bits
  1120.   and rebuilds the character (byte).
  1121.  
  1122.  
  1123.   There are several different types of UARTs.  You have probably heard
  1124.   of dumb UARTs - the 8250 and 16450, and smart or FIFO UARTs - the
  1125.   16550A.  To understand their differences, first let's examine what
  1126.   happens when a UART has sent or received a byte.
  1127.  
  1128.  
  1129.   The UART itself can't do anything with the data, it just sends and
  1130.   receives it.  The CPU gets an interrupt every time a byte has been
  1131.   sent or received.  The CPU then moves a received byte out of the
  1132.   UART's register and into memory somewhere, or gives the UART another
  1133.   byte to send. The 8250 and 16450 UARTs only have a 1 byte buffer.
  1134.   That means, that every time 1 byte is sent or received, it interrupts
  1135.   the CPU.  At low rates, this is OK.  But, at high transfer rates, the
  1136.   CPU get so busy dealing with the UART, that is doesn't have time to
  1137.   tend to other tasks.  In some cases, the CPU does not get around to
  1138.   servicing the interrupt in time, and the byte is overwritten, because
  1139.   they are coming in so fast.
  1140.  
  1141.  
  1142.   That's where the 16550A UARTs come in.  These chips come with 16 byte
  1143.   FIFOs.  This means that it can receive or transmit up to 16 bytes
  1144.   before it has to interrupt the CPU.  Not only can it wait, but the CPU
  1145.   then can transfer all 16 byte at a time.  Although the interrupt
  1146.   threshold is seldom set at 16, this is still a significant advantage
  1147.   over the other UARTs, which only have the 1 byte buffer.  The CPU
  1148.   receives less interrupts, and is free to do other things.   Data is
  1149.   not lost, and everyone is happy.
  1150.  
  1151.  
  1152.   In general, the 8250 and 16450 UARTs should be fine for speeds up to
  1153.   19200 bps.  After 19200, you might start seeing data loss, and a
  1154.   reduction in computing speed.
  1155.  
  1156.  
  1157.   Keep in mind that these dumb UART types are not bad, they just aren't
  1158.   good for high speeds.  You should have no problem connecting a
  1159.   terminal, or a mouse to these UARTs.  But, for a high speed modem, the
  1160.   16550A is definately a must.
  1161.  
  1162.  
  1163.   You can buy serial cards with the 16550A UARTs for a little more
  1164.   money, just ask your dealer what type of UART is on the card.  Or if
  1165.   you want to upgrade your existing card, you can simply purchase 16550A
  1166.   chips and replace your existing 16450 UARTs.  They are pin-to-pin
  1167.   compatible.  Some cards come with socketed UARTs for this purpose, if
  1168.   not you can solder.  Note, that you'll probably save yourself a lot of
  1169.   trouble by just getting a new card :-).
  1170.  
  1171.  
  1172.  
  1173.   17.  Troubleshooting
  1174.  
  1175.   17.1.  I keep getting ``line NNN of inittab invalid''
  1176.  
  1177.   Make sure you are using the correct syntax for your version of init.
  1178.   The different init's that are out there use different syntax in the
  1179.   /etc/inittab file.  Make sure you are using the correct syntax for
  1180.   your version of getty.
  1181.  
  1182.  
  1183.   17.2.  When I try to dial out, it says ``/dev/cuaN: Device or resource
  1184.   busy''
  1185.  
  1186.   This problem can arise when DCD is not set correctly.  DCD should only
  1187.   be set when there is an actual connection (ie someone is dialed in),
  1188.   not when getty is watching the port.  When getty sees DCD get set, it
  1189.   will lock the port and probably spawn login.  Check to make sure that
  1190.   your modem is configured to only set DCD when there is a connection.
  1191.   DTR and RTS should be set whenever something is using, or watching the
  1192.   line, like getty, kermit, or some other comm program.
  1193.  
  1194.   Another common cause of ``device busy'' errors, is that you set up
  1195.   your serial port with an interrupt already taken by something else.
  1196.   As each device initializes, it asks Linux for permission to use its
  1197.   hardware interrupt.  Linux keeps track of which interrupt is assigned
  1198.   to whom, and if your interrupt is already taken, your device won't be
  1199.   able to initialize properly.  The device really doesn't have much of
  1200.   any way to tell you that this happened, except that when you try to
  1201.   use it, it will return a ``device-busy'' error.  Check the interrupts
  1202.   on all of your cards (serial, ethernet, etc.).  Look for IRQ
  1203.   conflicts.
  1204.  
  1205.  
  1206.   17.3.  I keep getting ``Id SN respawning too fast: disabled for 5 min-
  1207.   utes''
  1208.  
  1209.   Make sure your modem is configured correctly.  Look at registers E and
  1210.   Q.  This can occur when your modem is chatting with getty.
  1211.  
  1212.   Make sure you are calling getty correctly from your /etc/inittab.
  1213.   Using the wrong syntax or device names will cause serious problems.
  1214.  
  1215.  
  1216.   17.4.  I have a modem/terminal connected, but root can't login on it.
  1217.  
  1218.   This is done on purpose for security reasons.  Generally, you should
  1219.   only have root logins enabled on the console.  It is considered
  1220.   dangerous to allow root logins on anything other than the console.
  1221.  
  1222.   But, you asked...  Edit /etc/login.defs, and find the line that says
  1223.   CONSOLE.  Add the name of the serial device to it.  Say I have my
  1224.   terminal on ttyS1.  I would change the line:
  1225.  
  1226.  
  1227.        CONSOLE tty1:tty2:tty3:tty4:tty5:tty6:tty8
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.   to
  1234.  
  1235.  
  1236.  
  1237.        CONSOLE tty1:tty2:tty3:tty4:tty5:tty6:tty8:ttyS1
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.   17.5.  it just locks up.  I have my terminal connected to my PC, but
  1244.   after I type in a login name,
  1245.  
  1246.   You probably don't have CLOCAL in your /etc/gettydefs entry for the
  1247.   terminal, and you're probably not using a full null modem cable.  You
  1248.   need CLOCAL.  CLOCAL tells Linux to ignore modem control signals.
  1249.   Here is what it should look like:
  1250.  
  1251.  
  1252.        #9600 baud Dumb Terminal entry
  1253.        DT9600# B9600 CS8 CLOCAL # B9600 SANE -ISTRIP CLOCAL #@S @L login: #DT9600
  1254.  
  1255.   Next, kill -TERM the getty process so a new one will be spawned with
  1256.   the new entry.
  1257.  
  1258.  
  1259.   17.6.  At high speeds, my modem looses data!
  1260.  
  1261.   If you are trying to run your modem at > 19200 bps, and you don't have
  1262.   16550A UARTs, you should upgrade them.  See section ``What are
  1263.   UARTs?'' about UARTs.
  1264.  
  1265.  
  1266.   17.7.  them configured!  On startup, Linux doesn't report the serial
  1267.   devices the way I have
  1268.  
  1269.   This is true.  Linux does not do any IRQ detection on startup, it only
  1270.   does serial device detection.  Thus, disregard what it says about the
  1271.   IRQ, because it's just assuming the standard IRQs.  This is done,
  1272.   because IRQ detection is unreliable, and can be fooled.
  1273.  
  1274.  
  1275.   So, even though I have my ttyS2 set at IRQ 5, I still see
  1276.  
  1277.  
  1278.        Jan 23 22:25:28 misfits vmunix: tty02 at 0x03e8 (irq = 4) is a 16550A
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.   You have to use setserial to tell Linux the IRQ you are using.
  1285.  
  1286.  
  1287.   17.8.  rz and or sz don't work when I call my Linux box on my modem.
  1288.  
  1289.   If Linux looks for /dev/modem when you try to transfer files, look at
  1290.   /etc/profile, and /etc/csh.cshrc.  There are a bunch of aliases
  1291.   defined there on some distributions, most notably Slackware.  These
  1292.   aliases mess up the zmodem programs.  Take them out, or correct them.
  1293.  
  1294.  
  1295.   17.9.  My screen is printing funny looking characters!
  1296.  
  1297.   This happens on virtual consoles when you send binary data to your
  1298.   screen, or sometimes on serial connections.  You can try the reset
  1299.   command, but I've found that it doesn't fix the problem.  The sure
  1300.   fire way to fix this is to type echo ^v^[c.  For the ASCII impaired,
  1301.   thats echo <ctrl>v<esc>c.
  1302.  
  1303.  
  1304.   17.10.  getty or uugetty still doesn't work.
  1305.  
  1306.   There is a DEBUG option that comes with getty_ps.  Edit your config
  1307.   file /etc/conf.{uu}getty.ttySN and add DEBUG=777.  If you are running
  1308.   syslogd, debugging info will appear in your log files.  If you aren't
  1309.   running syslogd info will appear in /tmp/getty:ttySN for debugging
  1310.   getty and /tmp/uugetty:ttySN for uugetty.  Look at the debugging info
  1311.   and see what is going on.  Most likely, you will need to tune some of
  1312.   the parameters in your config file, and you may have to configure your
  1313.   modem differently, too.
  1314.  
  1315.  
  1316.   17.10.1.  Alternate versions of getty
  1317.  
  1318.   You might like these better:
  1319.  
  1320.  
  1321.   mgetty, a different version of getty, can also handle faxes.  It can
  1322.   be found on the Linux FTP sites.
  1323.  
  1324.  
  1325.   agetty, yet another version of getty.  This version comes with most
  1326.   distributions.  If not, it should be on the Linux FTP sites.
  1327.  
  1328.  
  1329.  
  1330.   18.  Contributions
  1331.  
  1332.  
  1333.   There was no possible way to write this HOWTO alone.  Although a lot
  1334.   of the HOWTO is my writing, I have often rewritten contributions to
  1335.   maintain continuity in the writing style and flow.  Thanks to everyone
  1336.   who has contributed or commented, the list of people has gotten too
  1337.   long to list.  Special thanks to Matt Welch, Ted T'so, and Kris
  1338.   Gleason.
  1339.  
  1340.  
  1341.   END OF Serial-HOWTO
  1342.